\(\int \frac {\frac {a B}{b}+B \sec (c+d x)}{a+b \sec (c+d x)} \, dx\) [345]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F(-2)]
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 6 \[ \int \frac {\frac {a B}{b}+B \sec (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {B x}{b} \]

[Out]

B*x/b

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {21, 8} \[ \int \frac {\frac {a B}{b}+B \sec (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {B x}{b} \]

[In]

Int[((a*B)/b + B*Sec[c + d*x])/(a + b*Sec[c + d*x]),x]

[Out]

(B*x)/b

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rubi steps \begin{align*} \text {integral}& = \frac {B \int 1 \, dx}{b} \\ & = \frac {B x}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int \frac {\frac {a B}{b}+B \sec (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {B x}{b} \]

[In]

Integrate[((a*B)/b + B*Sec[c + d*x])/(a + b*Sec[c + d*x]),x]

[Out]

(B*x)/b

Maple [A] (verified)

Time = 0.36 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.17

method result size
default \(\frac {B x}{b}\) \(7\)
norman \(\frac {B x}{b}\) \(7\)
risch \(\frac {B x}{b}\) \(7\)
derivativedivides \(\frac {B \left (d x +c \right )}{d b}\) \(14\)

[In]

int((a*B/b+B*sec(d*x+c))/(a+b*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

B*x/b

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int \frac {\frac {a B}{b}+B \sec (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {B x}{b} \]

[In]

integrate((a*B/b+B*sec(d*x+c))/(a+b*sec(d*x+c)),x, algorithm="fricas")

[Out]

B*x/b

Sympy [A] (verification not implemented)

Time = 2.83 (sec) , antiderivative size = 3, normalized size of antiderivative = 0.50 \[ \int \frac {\frac {a B}{b}+B \sec (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {B x}{b} \]

[In]

integrate((a*B/b+B*sec(d*x+c))/(a+b*sec(d*x+c)),x)

[Out]

B*x/b

Maxima [F(-2)]

Exception generated. \[ \int \frac {\frac {a B}{b}+B \sec (c+d x)}{a+b \sec (c+d x)} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((a*B/b+B*sec(d*x+c))/(a+b*sec(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?`
 for more de

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 13 vs. \(2 (6) = 12\).

Time = 0.30 (sec) , antiderivative size = 13, normalized size of antiderivative = 2.17 \[ \int \frac {\frac {a B}{b}+B \sec (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {{\left (d x + c\right )} B}{b d} \]

[In]

integrate((a*B/b+B*sec(d*x+c))/(a+b*sec(d*x+c)),x, algorithm="giac")

[Out]

(d*x + c)*B/(b*d)

Mupad [B] (verification not implemented)

Time = 14.48 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int \frac {\frac {a B}{b}+B \sec (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {B\,x}{b} \]

[In]

int((B/cos(c + d*x) + (B*a)/b)/(a + b/cos(c + d*x)),x)

[Out]

(B*x)/b